<template>
  <div id="app">
    <Left v-if="show"></Left>

    <div class="right">
      <Top v-if="show1"></Top>
      <router-view />
    </div>
  </div>
</template>
<script>
import Left from "@/components/home/HomeHeader.vue";
import Top from "@/components/home/HomeTop.vue";
export default {
  components: {
    Left,
    Top
  },
  data() {
    return {
      show: true,
      show1: true
    };
  },
  created: function() {
    if (this.$route.path === "/login") {
      this.show = false;
      this.show1 = false;
    } else {
      this.show = true;
      this.show1 = true;
    }
  },
  watch: {
    $route(e) {
      if (e.name === "login") {
        this.show = false;
        this.show1 = false;
      } else {
        this.show = true;
        this.show1 = true;
      }
    }
  }
};
</script>
<style>
* {
  padding: 0;
  margin: 0;
}
.el-table__row--level-0 {
  background-color: rgba(208, 222, 219, 1) !important;
}
.el-tabs__item.is-active {
  background: rgba(56, 175, 151, 1);
  color: rgba(255, 255, 255, 1) !important;
}
.el-tabs__item {
  padding: 0 20px !important;
}
.uploadHide .el-upload.el-upload--picture-card {
  display: none;
}
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  width: 100%;
  min-height: 768px;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}
.right {
  width: 100%;
  /* height: 1080px; */
  background-color: #f2f2f2;
}
.right-nav {
  width: -webkit-calc(100% - 40px);
  width: -moz-calc(100% - 40px);
  width: calc(100% - 40px);
  min-height: 684px;
  background-color: #ffffff;
  margin: 20px 20px 0 20px;
}
body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
dl,
ol,
ul,
dd,
input,
textarea,
button {
  padding: 0;
  margin: 0;
}
html {
  font-size: calc(100vw / 7.5);
}
body {
  font-size: 0.24rem;
}
img {
  vertical-align: top;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
li {
  list-style: none;
}
body {
  font-family: "微软雅黑", "宋体", Arial;
  font-size: 12px;
  color: #666;
}
input {
  color: inherit;
  font-size: inherit;
  font-family: inherit;
}
textarea {
  resize: none;
}
input:focus,
button:focus,
textarea:focus,
select:focus {
  outline: none;
}
input[type="button"],
input[type="reset"],
input[type="submit"] {
  cursor: pointer;
}
a:hover {
  color: #abbbba !important;
}
.sl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clear:after {
  content: ".";
  display: block;
  clear: both;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}
.cll {
  zoom: 1;
}
</style>
